<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<META name="keywords" content="$!config.keywords" />
<META name="description" content="$!config.description" />
<title>$!dir.title - $!doc.title</title>
<link rel="stylesheet" href="skin/gold/css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="skin/gold/css/style.css" type="text/css" media="screen" />
<script type="text/javascript" src="res/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="res/js/common.js"></script>
<script type="text/javascript" src="skin/gold/js/html5.js"></script>
<script type="text/javascript" src="skin/gold/js/ikeke.js"></script>
<!--[if lte IE 6]>
<script type="text/javascript" src="skin/gold/js/DD_belatedPNG.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('a,a:hover,div,span,img,li');
</script>
<![endif]-->
<script language="JavaScript">
function gotoPage(n)
{
	location.replace("/bbsdoc.do?parameter=show&&cid=$!cid&page="+n);	
	return false;
}
#if(!$need_verify)
var need_verify=1;
var yzm_str='<INPUT name=randomCode size=6 maxlength=4><span style="padding-left:0px;"><img src="/bbs/randomCode.do" align="middle"></span>请输入前面图中的四位验证码，字母不区分大小写';
#else
var need_verify=0;
#end
function checkFocus(){ 
if(need_verify==1){
    if(document.getElementById('randomCodeImg').innerHTML==null || document.getElementById('randomCodeImg').innerHTML==''){
      document.getElementById('randomCodeImg').innerHTML=yzm_str;
    }
  }  
 }
function Quoto(id)
{
	EditForm.quotid.value=id;
}
function doSave()
{
	if(doCheck())
	{
	if(EditForm.cid.value!="")EditForm.parameter.value="update";
	EditForm.submit();
	}
}

function openScript(url, width, height){
var Win =window.open(url,"openScript",'left=150,top=200,width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=no' );
}

function doCheck()
{
	if(EditForm.title.value=="")
	{
		alert("标题不能为空！");
		EditForm.title.focus();
		return false;
	}
	if(EditForm.content.value=="")
	{
		alert("内容不能为空！");
		EditForm.content.focus();
		return false;
	}
	return true;
}

function doRefresh(obj,file)
{
	if(file!="")
	{
		eval(obj+".value=file");
	}
}

function doUploadImg()
{
	upImgFrame.EditForm.parentObj.value="EditForm.imgs";
	upImgFrame.EditForm.types.value="doc";
	upImgFrame.doUpload();
}
function doUpload()
{
	upFrame.EditForm.parentObj.value="EditForm.files";
	upFrame.EditForm.types.value="doc";
	upFrame.doUpload();
}

function doSetTop(id)
{
	ListForm.parameter.value="setTopMessage";
	ListForm.cid.value=id;
	ListForm.submit();
}
function doLockDoc(id)
{
	ListForm.parameter.value="lockMessage";
	ListForm.cid.value=id;
	ListForm.submit();
}
function doFavDoc(id)
{
	ListForm.parameter.value="favMessage";
	ListForm.cid.value=id;
	ListForm.submit();
}

function doEdit(id)
{
	ListForm.parameter.value="edit";
	ListForm.cid.value=id;
	ListForm.submit();
}
function doDel(id)
{
	if(confirm("帖子删除后不能恢复，确认是否要删除帖子")){
		ListForm.parameter.value="del";
		ListForm.cid.value=id;
		ListForm.submit();
	}
}
function doSetElite(id)
{
	ListForm.parameter.value="setEliteMessage";
	ListForm.cid.value=id;
	ListForm.submit();
}
function doMoveDoc(id)
{
	var x=event.screenX;
	var y=event.screenY;
	var result=window.showModalDialog('/bbsdoc.do?parameter=showMove','ChoiceDirSn',"dialogLeft:"+x+"px;dialogTop:"+y+"px;dialogWidth:195px;dialogHeight:400px;help:no;status:no");
	if(result!=""){
		ListForm.parameter.value="moveMessage";
		ListForm.dirsn.value=result;
		ListForm.cid.value=id;
		ListForm.submit();
	}
}
function doLockUser(user)
{
}

</script>
</head>
<body>
<div id="container">
	<div id="asideback"></div>
	<div id="asideswitch"><div class="button"></div></div>
	#parse('/inc/left.htm')
	
	<div id="rightbody"><!-- 主体部分 -->
		<section id="wrapper">
			#parse('/inc/head.htm')
			#parse('/inc/dir_info.htm')
			#parse('/inc/doc_search.htm')
			<table class="post1">
				<thead>
					<tr>
						<th colspan="2">主题：$!doc.title<span> [<a href="#" onClick="location.href='/bbscollections.do?parameter=add&url='+location.href;return false;"><font color=white>收藏</font></a>]</span></th>
					</tr>
				</thead>
				<tfoot>
					<tr>
						<td colspan="2" class="alignright">
							<a href="/bbs/bbsdoc.do?parameter=new&sn=$!dir.sn" style="margin-right: 10px;"><img src="skin/gold/images/public/post_topics_button.jpg" alt="" /></a>
							<a href="/bbs/bbsdoc.do?parameter=lastElite&sn=$!dir.sn" style="margin-right: 10px;"><img src="skin/gold/images/public/marrow_button.jpg" alt="" /></a>
							<a href="javascript:location.reload()"><img src="skin/gold/images/public/refresh.jpg" alt="" /></a>
						</td>
					</tr>
				</tfoot>
				<tbody>
					<tr>
						<th width="168">
							<div class="user">
								<p class="avatar">
									<a href="/bbs/bbsuser.do?parameter=show&user=$!topicUser.username">
									#if($topicUser.photo)
									<img src="/bbs$!topicUser.photo" align="absmiddle" onload="javascript:if(this.width>120)this.width=120" />
									#else
			                       	<img src="skin/gold/images/headlogo/default.jpg" align="absmiddle" onload="javascript:if(this.width>120)this.width=120" />
									#end
									<br />$!topicUser.username</a><br /><span class="red">$!topicUser.getRoleName($dir.sn)</a>
								</p>
								<p class="info">
									<a href="/bbs/bbsfriends.do?parameter=add&friend=$!topicUser.username" class="left"><img src="skin/gold/images/post/join_before.jpg" alt="" />加为好友</a>
									<a href="/bbs/bbsmessage.do?parameter=write&toname=$!topicUser.username" class="right"><img src="skin/gold/images/post/message_before.jpg" alt="" />发短信息</a>
									<div class="clear"></div>
								</p>
							</div>
						</th>
						<td>
							#if($doc.tagpic)
							<img src="/bbs/images/emot/face$!{doc.tagpic}.gif" />
							#end
							$!doc.content
							#if($!CommUtil.hasLength($doc.imgs))
							<br>
							<IMG SRC="/bbs$!doc.imgs" border=0 onload="javascript:if(this.width>screen.width*.90)this.width=screen.width*.90"><br>
							#end
							#if($!CommUtil.hasLength($doc.files))
							<br>
							<font color="#FF0000">相关附件下载:</font>
							<a href="/bbs$!doc.files" target="_blank"><font color="#0000FF">$!doc.files</font></a><br>
							#end
						</td>
					</tr>
					<tr class="reply"><td style="border-top: 0;"></td><td>
					#if($topMessage)
                      <img src="/bbs/images/bbs/biao_1.gif" width="13" height="16"/>[<a href="javascript:doSetTop('$!doc.cid');">置顶</a>] &nbsp;
                      #end
                      #if($lockMessage)
					  <img src="/bbs/images/bbs/biao_2.gif" width="17" height="13">[<a href="javascript:doLockDoc('$!doc.cid');">加锁</a>] &nbsp;
					  #end
                     #if($editMessage)
                      <img src="/bbs/images/bbs/biao_3.gif" width="16" height="16">[<a href="javascript:doEdit('$!cid');">修改</a>] &nbsp;
                     #end
					 #if($delMessage)
                      <img src="/bbs/images/bbs/biao_6.gif" width="14" height="15">[<a href="javascript:doDel('$!doc.cid');">删除</a>] &nbsp;
                   #end
				   #if($eliteMessage)
                      <img src="/bbs/images/bbs/biao_7.gif" width="15" height="15">[<a href="javascript:doSetElite('$!doc.cid');">精华</a>] &nbsp;
                    #end
					#if($moveMessage)
                      <img src="/bbs/images/bbs/biao_7.gif" width="15" height="15">[<a href="javascript:doMoveDoc('$!doc.cid');">转移</a>] &nbsp;
                    #end
					#if($lockUser)
                      <img src="/bbs/images/bbs/biao_2.gif" width="17" height="13">[<a href="javascript:doLockUser('$!inputuser');">锁定用户</a>] &nbsp;
					 #end
                     #if($favMessage)
                      <a href="javascript:doFavDoc('$!doc.cid');"><img src="/bbs/images/bbs/sc.gif" width="20" height="15" border="0" title="收藏"></a> &nbsp;
					#end
						<a href="#reply" onClick="javascript:Quoto('$!doc.cid');"><img src="skin/gold/images/post/reply_before.jpg" alt="" />引用回复</a>
						$!doc.modifytime
					</td></tr>
					#foreach($info in $list)
					<tr class="null"><td colspan="2"></td></tr>
					<tr>
						<th width="168">
							<div class="user">
								<p class="avatar">
									<a href="javascript:ShowUser('$!info.username')">
									#if($info.replyUser.photo)
									<img src="/bbs$!info.replyUser.photo" align="absmiddle" onload="javascript:if(this.width>120)this.width=120" />
									#else
			                       	<img src="skin/gold/images/headlogo/default.jpg" align="absmiddle" onload="javascript:if(this.width>120)this.width=120" />
									#end
									<br />$!info.username</a><br /><span class="red">$!info.replyUser.getRoleName($dir.sn)</a>
								</p>
								<p class="info">
									<a href="/bbs/bbsfriends.do?parameter=add&friend=$!info.username" class="left"><img src="skin/gold/images/post/join_before.jpg" alt="" />加为好友</a>
									<a href="/bbs/bbsmessage.do?parameter=write&toname=$!info.username" class="right"><img src="skin/gold/images/post/message_before.jpg" alt="" />发短信息</a>
									<div class="clear"></div>
								</p>
							</div>
						</th>
						<td>
							#if($info.doc.tagpic) <img src="/bbs/images/emot/face$!{info.doc.tagpic}.gif" />#end 
							$!info.doc.content
							#if($!CommUtil.hasLength($info.doc.imgs))
							<br>
							<IMG SRC="/bbs$!info.doc.imgs" border=0 onload="javascript:if(this.width>screen.width*.90)this.width=screen.width*.90"><br>
							#end
							#if($!CommUtil.hasLength($info.doc.files))
							<br>
							<font color="#FF0000">相关附件下载:</font>
							<a href="/bbs$!info.doc.files" target="_blank"><font color="#0000FF">$!info.doc.files</font></a><br>
							#end
						</td>
					</tr>
					<tr class="reply"><td style="border-top: 0;"></td><td><a href="javascript:Quoto('$!info.doc.cid');" class="layer">楼层：$!info.floor</a>
					#if($info.lockMessage)
					<img src="/bbs/images/bbs/biao_2.gif" width="17" height="13">[<a href="javascript:doLockDoc('$!info.doc.cid')">加锁</a>] &nbsp;
					#end
					#if($info.editMessage)
					<img src="/bbs/images/bbs/biao_3.gif" width="16" height="16">[<a href="javascript:doEdit('$!info.doc.cid');">修改</a>] &nbsp;
					#end
					#if($info.delMessage)
					<img src="/bbs/images/bbs/biao_6.gif" width="14" height="15">[<a href="javascript:doDel('$!info.doc.cid');">删除</a>] &nbsp;
					#end
					#if($info.lockUser)
					<img src="/bbs/images/bbs/biao_2.gif" width="17" height="13">[锁定用户] &nbsp;
					#end
					#if($info.favMessage) <a href="javascript:doFavDoc('$!info.doc.cid')"><img src="/bbs/images/bbs/sc.gif" width="20" height="15" border="0" title="收藏"></a> &nbsp;
					#end
					<a href="javascript:Quoto('$!info.doc.cid');"><img src="skin/gold/images/post/reply_before.jpg" alt="" />引用回复</a></td></tr>
					#end
					<tr class="page">
						<td colspan="2">
							共<b>$!rows</b>条回复 共<strong>$!pages</strong>页,目前为第<strong>$!page</strong>页 分页：$!gotoPageHTML
						</td>
					</tr>
				</tbody>
			</table>
#if(!$isLock)
<a name="reply"></a>
			<table class="post2">
				<thead>
					<tr><th colspan="2">请在下面输入回复信息</th></tr>
				</thead>
				<tbody>
				<form name="EditForm" method="post" action="/bbs/bbsdoc.do">
					<input type="hidden" name="parameter" value="add"/>
					<input type="hidden" name="subCommand" value=""/>
					<input type="hidden" name="cid"   value=""/>
					<input type="hidden" name="dirsn"   value="$!dir.sn"/>
					<input name="parentid" type="hidden" value="$!cid"/>
					<input name="title" type="hidden" class="input3" id="title"  size="40" value="回复主题：$!title"/>
					<input name="quotid" type="hidden" id="quotid" value="" />
					#if($user)
					<tr>
						<th>表情图片<br /><span><a href="javascript:openScript('/bbs/smiley.htm?start=1',500,400)">加入心情图标<img src="skin/gold/images/post/add_button.jpg" alt="" /></a></span></th>
						<td>
							<label><input type="radio" name="tagpic" value="1" /><img src="/bbs/images/emot/face1.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="2" /><img src="/bbs/images/emot/face2.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="3" /><img src="/bbs/images/emot/face3.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="4" /><img src="/bbs/images/emot/face4.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="5" /><img src="/bbs/images/emot/face5.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="6" /><img src="/bbs/images/emot/face6.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="7" /><img src="/bbs/images/emot/face7.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="8" /><img src="/bbs/images/emot/face8.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="9" /><img src="/bbs/images/emot/face9.gif" alt="" /></label><br />
							<label><input type="radio" name="tagpic" value="10" /><img src="/bbs/images/emot/face10.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="11" /><img src="/bbs/images/emot/face11.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="12" /><img src="/bbs/images/emot/face12.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="13" /><img src="/bbs/images/emot/face13.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="14" /><img src="/bbs/images/emot/face14.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="15" /><img src="/bbs/images/emot/face15.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="16" /><img src="/bbs/images/emot/face16.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="17" /><img src="/bbs/images/emot/face17.gif" alt="" /></label>
							<label><input type="radio" name="tagpic" value="18" /><img src="/bbs/images/emot/face18.gif" alt="" /></label>
						</td>
					</tr>
					#end
					<tr>
						<th>内容</th>
						<td>
							#if($user)
							<textarea cols="60" rows="5" name="content" onFocus="checkFocus();"></textarea>
							#else
							您还没有 
							[<a class=cblue href="/bbs/bbsuser.do?parameter=reg">注册</a>] 
							或 
							[<a class=cblue href="/bbs/bbsuser.do">登录</a>] 
							#end
						</td>
					</tr>
					#if($user)
					<tr class="narrow">
						<td class="alignright">相关图片：</td>
						<td><input id="imgs" type="text" name="imgs" class="normal" value="$!imgs" /><span>各图片之间用逗号隔开</span>#if($canUpload)<iframe name="upImgFrame" style="vertical-align:middle" id="upImgFrame" src="/bbs/bbsUpload.do" frameborder=0 scrolling=no width="180" height="25"></iframe><input type="button" name="Submit2" value="" class="us" onClick="doUploadImg();" />#end</td>
					</tr>
					<tr class="narrow">
						<td class="alignright">相关附件：</td>
						<td><input id="files" type="text" name="files" class="normal" value="$!files" /><span>各附件之间用逗号隔开</span>#if($canUpload)<iframe name="upFrame" style="vertical-align:middle" id="upFrame" src="/bbs/bbsUpload.do" frameborder=0 scrolling=no width="180" height="25"></iframe><input type="button" name="Submit3" value="" class="us" onClick="doUpload();" />#end</td>
					</tr>
					#if(!$need_verify)
					<tr class="narrow">
						<td class="alignright">验证码：</td>
						<td><div id=randomCodeImg></div></td>
					</tr>
					#end
					<tr><td></td><td><input type="submit" name="Submit1" class="s" value="" /></td></tr>
					#end
				</form>
				</tbody>
			</table>
#end
		</section>
	</div>
	
	#parse('/inc/foot.htm')
</div>
</body>
</html>